import request from '@/utils/request'

export function HostUser(method, value) {
  let url = ''
  let data = null

  if (method === 'PUT') {
    url = '/HostUser/' + value.id
    data = value
  } else if (method === 'POST') {
    url = '/HostUser'
    data = value
  }
  return request({
    url,
    method,
    data
  })
}

export function HostUserSearch(data) {
  return request({
    url: '/HostUser/Search',
    method: 'post',
    data
  })
}

export function HostUserDetail(data) {
  return request({
    url: '/HostUser/' + data.id,
    method: 'get'
  })
}

export function HostUserDel(data) {
  return request({
    url: '/HostUser/' + data.id,
    method: 'delete'
  })
}
